#pragma once

#include "Food.h"

class Corpse : public Food {
protected:
	int m_rotCounter;
	bool m_rotting;
	bool m_poisoned;
	NpcType m_npcType;
public:
	Corpse(NpcType npcType);
	Corpse(std::ifstream& file);
	~Corpse();
	void eatEffects(Player* player);
	int getSatiation() const;
	NpcType getNpcType() const;
	void render(float x, float y);
	bool isPoisoned() const;
	std::string getItemName(int mod = 0) const;
	bool typeEqual(const GameObject& obj) const;
	bool reduceRotCounter();
	void addToStack(Item* item);
	int getRotCounter() const;
	bool isRotting() const;
	bool specialEqual(Item* item) const;
	void reduceStackCount(int num, bool destroy = false, std::list<Item*>* items = NULL);
	void save(std::ofstream& file) const;
};

inline NpcType Corpse::getNpcType() const {return m_npcType;}
inline bool Corpse::isPoisoned() const {return m_poisoned;}
inline int Corpse::getRotCounter() const {return m_rotCounter;}
inline bool Corpse::isRotting() const {return m_rotting;}
inline bool Corpse::specialEqual(Item* item) const {return ((Corpse*)item)->isRotting() == m_rotting;}

